/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GUI;

import Berekenen.Calc;
import Delta.Lamel;
import Domain.Materiaal;
import Domain.MateriaalSoort;
import Delta.Epoxy;
import Delta.Fiber;
import java.awt.Point;

/**
 *
 * @author Memet
 */
public class showMaterialDetails extends javax.swing.JFrame {

    //Materiaal mat;
    Lamel mat;
    double longHeight;
    double shortHeight;
    Point pos;
    /**
     * Creates new form showMaterialDetails
     */
    public showMaterialDetails() {
        initComponents();
        
        mat = null;
        longHeight = this.getSize().getHeight();
        shortHeight = this.getSize().getHeight() - 140;
        pos = pnlData.getLocation();
    }

    public void setMaterial(Lamel mat)
    {
        this.mat = mat;
        this.refreshView();
    }

    public void refreshView()
    {
        btnAnglePly.setEnabled(false);
        cbAnglePly.setEnabled(false);
        foldIn();
        if(mat != null)
        {
            String e1 = "E1:";
            String e2 = "E2:";
            String e3 = "E3:";
            String g12 = "G12:";
            String g23 = "G23:";
            String g31 = "G31:";
            String v12 = "v12:";
            String v23 = "v23:";
            String v31 = "v31:";
            String alp1 = "α1:";
            String alp2 = "α2:";
            String alp3 = "α3:";
            
            //TODO: e3, g31 etc. Zie hieronder
            
            //tijdelijk:
            double valE3, valG31, valV31, valAlp3;
            String e3Val = "";
            String g31Val = "";
            String v31Val = "";
            String alp3Val = "";
            
            //origineel:
            //double valE3 = mat.getE3()/1e9;
            //double valG31 = mat.getG31()/1e9;
            //double valV31 = mat.getNu31();
            //double valAlp3 = mat.getA3();
            
            //String e3Val = String.valueOf(Calc.Round(valE3,2))+" GPa";
            //String g31Val = String.valueOf(Calc.Round(valG31,2))+" GPa";
            //String v31Val = String.valueOf(Calc.Round(valV31, 2));
            //String alp3Val = String.valueOf(Calc.Round(valAlp3, 2));
            if(mat.getType().equals(MateriaalSoort.UNIDIRECTIONAAL))
            {
                e1 = "El:";
                e2 = "Et:";
                e3 = "   ";
                g12 = "Glt:";
                g23 = "Gtt:";
                g31 = "    ";
                v12 = "vlt:";
                v23 = "vtt:";
                v31 = "    ";
                alp1= "αl:";
                alp2= "αt:";
                alp3= "   ";
                e3Val = "";
                g31Val = "";
                v31Val = "";
                alp3Val = "";
                lblE3Val.setBorder(null);
                lblg31Val.setBorder(null);
                lblv31Val.setBorder(null);
                lblAlp3Val.setBorder(null);
                btnAnglePly.setEnabled(true);
                cbAnglePly.setEnabled(true);
            }

            lblName.setText(mat.getName());
            lblManufacturer.setText(mat.getManufacturer());
            lblE1.setText(e1);
            lblE2.setText(e2);
            lblE3.setText(e3);
            lblg12.setText(g12);
            lblg23.setText(g23);
            lblg31.setText(g31);
            lblv12.setText(v12);
            lblv23.setText(v23);
            lblv31.setText(v31);
            lblAlp1.setText(alp1);
            lblAlp2.setText(alp2);
            lblAlp3.setText(alp3);

            double valE1 = mat.getEl()/1e9;
            double valE2 = mat.getEt()/1e9;
            //TODO: G12 en G23, en checken of E1 en E2 wel El en Et zijn, EN of V12 en V23 wel Mult en Mutl zijn.
            double valG12 = 0;
            double valG23 = 0;
            //double valG12 = mat.getG12()/1e9;
            //double valG23 = mat.getG23()/1e9;
            double valV12 = mat.getMult();
            double valV23 = mat.getMutl();
            double valAlp1 = mat.getAlphaL();
            double valAlp2 = mat.getAlphaT();
            
            lblE1Val.setText(String.valueOf(Calc.Round(valE1,2))+" GPa");
            lblE2Val.setText(String.valueOf(Calc.Round(valE2,2))+" GPa");
            lblE3Val.setText(e3Val);
            lblg12Val.setText(String.valueOf(Calc.Round(valG12,2))+" GPa");
            lblg23Val.setText(String.valueOf(Calc.Round(valG23,2))+" GPa");
            lblg31Val.setText(g31Val);
            lblv12Val.setText(String.valueOf(Calc.Round(valV12, 2)));
            lblv23Val.setText(String.valueOf(Calc.Round(valV23, 2)));
            lblv31Val.setText(v31Val);
            lblAlp1Val.setText(String.valueOf(Calc.Round(valAlp1, 2)));
            lblAlp2Val.setText(String.valueOf(Calc.Round(valAlp2, 2)));
            lblAlp3Val.setText(alp3Val);

            lblH.setText(String.valueOf(Calc.Round(mat.getThickness(), 2))+" mm");
            lblRho.setText(String.valueOf(Calc.Round(mat.getRhol(), 2))+" Kg/m3");

            pnlExample1.setSet(mat.getColorSet());
            pnlExample1.setSoort(mat.getType());

            if(!mat.isPrepreg())
            {
                btnFE.setEnabled(true);
                Fiber f = mat.getMyFiber();
                Epoxy e = mat.getMyEpoxy();
                lblFibE.setText(String.valueOf(Calc.Round(f.getE()/1e9, 2))+" GPa");
                lblEpoE.setText(String.valueOf(Calc.Round(e.getE()/1e9, 2))+" GPa");
                lblFibv.setText(String.valueOf(Calc.Round(f.getMu(), 2)));
                lblEpov.setText(String.valueOf(Calc.Round(e.getMu(), 2)));
                lblFibRho.setText(String.valueOf(Calc.Round(f.getRho(), 2))+" Kg/m3");
                lblEpoRho.setText(String.valueOf(Calc.Round(e.getRho(), 2))+" Kg/m3");
                lblFibName.setText(f.getName());
                lblEpoName.setText(e.getName());
                lblFibManufacturer.setText(f.getManufacturer());
                lblEpoManufacturer.setText(e.getManufacturer());
                lblVf.setText(String.valueOf(mat.getVf()));
                lblFibAlpha.setText(String.valueOf(f.getAl()));
                //TODO: label voor alphaR toevoegen aan design en de regel hierboven ook toepassen voor alphaR
                lblEpoAlpha.setText(String.valueOf(e.getA()));
            }
            
            else
            {
                btnFE.setEnabled(false);
                foldIn();
            }
        }
        //btnAnglePly.setEnabled(false); //demo
    }
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        lblManufacturer = new javax.swing.JLabel();
        pnlFE = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        jLabel5 = new javax.swing.JLabel();
        lblFibv = new javax.swing.JLabel();
        lblFibManufacturer = new javax.swing.JLabel();
        lblFibE = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        lblFibRho = new javax.swing.JLabel();
        lblFibName = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        lblFibAlpha = new javax.swing.JLabel();
        jPanel3 = new javax.swing.JPanel();
        jLabel7 = new javax.swing.JLabel();
        lblEpov = new javax.swing.JLabel();
        lblEpoManufacturer = new javax.swing.JLabel();
        lblEpoE = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        lblEpoRho = new javax.swing.JLabel();
        lblEpoName = new javax.swing.JLabel();
        lblEpoAlpha = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        lblVf = new javax.swing.JLabel();
        lblName = new javax.swing.JLabel();
        pnlData = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        lblE1 = new javax.swing.JLabel();
        lblE1Val = new javax.swing.JLabel();
        lblg12 = new javax.swing.JLabel();
        lblg12Val = new javax.swing.JLabel();
        lblv12 = new javax.swing.JLabel();
        lblv12Val = new javax.swing.JLabel();
        lblAlp1 = new javax.swing.JLabel();
        lblAlp1Val = new javax.swing.JLabel();
        jPanel7 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        pnlExample1 = new Draw.pnlExample();
        lblH = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        lblRho = new javax.swing.JLabel();
        jPanel6 = new javax.swing.JPanel();
        lblE3 = new javax.swing.JLabel();
        lblg31 = new javax.swing.JLabel();
        lblv31 = new javax.swing.JLabel();
        lblAlp3 = new javax.swing.JLabel();
        lblE3Val = new javax.swing.JLabel();
        lblg31Val = new javax.swing.JLabel();
        lblv31Val = new javax.swing.JLabel();
        lblAlp3Val = new javax.swing.JLabel();
        jPanel5 = new javax.swing.JPanel();
        lblE2 = new javax.swing.JLabel();
        lblE2Val = new javax.swing.JLabel();
        lblg23 = new javax.swing.JLabel();
        lblg23Val = new javax.swing.JLabel();
        lblv23 = new javax.swing.JLabel();
        lblv23Val = new javax.swing.JLabel();
        lblAlp2 = new javax.swing.JLabel();
        lblAlp2Val = new javax.swing.JLabel();
        jPanel4 = new javax.swing.JPanel();
        btnAnglePly = new javax.swing.JButton();
        cbAnglePly = new javax.swing.JComboBox();
        btnFE = new javax.swing.JToggleButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        lblManufacturer.setFont(new java.awt.Font("Trebuchet MS", 2, 18)); // NOI18N
        lblManufacturer.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblManufacturer.setText("<Manufacturer>");

        jLabel5.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel5.setText("v:");

        lblFibv.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblFibv.setText("<v>");

        lblFibManufacturer.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblFibManufacturer.setText("<Manufacturer>");

        lblFibE.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblFibE.setText("<E> GPa");

        jLabel4.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel4.setText("E:");

        jLabel6.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel6.setText("ρ:");

        jLabel2.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel2.setText("Fiber:");

        lblFibRho.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblFibRho.setText("<html><rho> Kg/m<sup>3</sup></html>");

        lblFibName.setText("<name>");

        jLabel12.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel12.setText("α:");

        lblFibAlpha.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblFibAlpha.setText("<html><alpha>°C<sup>-1</sup></html>");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblFibName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel4)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblFibE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel5)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblFibv, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel6)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblFibRho))
                    .addComponent(lblFibManufacturer, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel12)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblFibAlpha)))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(lblFibName))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblFibManufacturer)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(lblFibE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(lblFibv))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(lblFibRho, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 9, Short.MAX_VALUE)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(lblFibAlpha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        jLabel7.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel7.setText("v:");

        lblEpov.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblEpov.setText("<v>");

        lblEpoManufacturer.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblEpoManufacturer.setText("<Manufacturer>");

        lblEpoE.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblEpoE.setText("<E> GPa");

        jLabel8.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel8.setText("E:");

        jLabel9.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel9.setText("ρ:");

        jLabel10.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel10.setText("Epoxy:");

        lblEpoRho.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblEpoRho.setText("<html><rho> Kg/m<sup>3</sup></html>");

        lblEpoName.setText("<name>");

        lblEpoAlpha.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblEpoAlpha.setText("<html><alpha>°C<sup>-1</sup></html>");

        jLabel13.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel13.setText("α:");

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(jLabel10)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblEpoName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(jLabel8)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblEpoE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(jLabel7)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblEpov, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(jLabel9)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblEpoRho))
                    .addComponent(lblEpoManufacturer, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                        .addComponent(jLabel13)
                        .addGap(11, 11, 11)
                        .addComponent(lblEpoAlpha)))
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel10)
                    .addComponent(lblEpoName))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblEpoManufacturer)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(lblEpoE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(lblEpov))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel9)
                    .addComponent(lblEpoRho, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 9, Short.MAX_VALUE)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblEpoAlpha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel13))
                .addContainerGap())
        );

        jLabel11.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel11.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel11.setText("Fibervolumefraction:");

        lblVf.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblVf.setText("<vf>");

        javax.swing.GroupLayout pnlFELayout = new javax.swing.GroupLayout(pnlFE);
        pnlFE.setLayout(pnlFELayout);
        pnlFELayout.setHorizontalGroup(
            pnlFELayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlFELayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlFELayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblVf, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlFELayout.setVerticalGroup(
            pnlFELayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlFELayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlFELayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlFELayout.createSequentialGroup()
                        .addGap(28, 28, 28)
                        .addComponent(jLabel11)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblVf)
                        .addContainerGap(83, Short.MAX_VALUE))
                    .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );

        lblName.setFont(new java.awt.Font("Trebuchet MS", 1, 24)); // NOI18N
        lblName.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblName.setText("<Name>");

        lblE1.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        lblE1.setText("E1:");

        lblE1Val.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblE1Val.setText("<E1> GPa");

        lblg12.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        lblg12.setText("G12:");

        lblg12Val.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblg12Val.setText("<G12> GPa");

        lblv12.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        lblv12.setText("v12:");

        lblv12Val.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblv12Val.setText("<v12>");

        lblAlp1.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        lblAlp1.setText("α1:");

        lblAlp1Val.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblAlp1Val.setText("<alpha1>");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(lblAlp1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(lblE1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(lblv12, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(lblg12, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lblE1Val, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 67, Short.MAX_VALUE)
                    .addComponent(lblg12Val, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 67, Short.MAX_VALUE)
                    .addComponent(lblv12Val, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 67, Short.MAX_VALUE)
                    .addComponent(lblAlp1Val, javax.swing.GroupLayout.DEFAULT_SIZE, 67, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblE1)
                    .addComponent(lblE1Val))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblg12)
                    .addComponent(lblg12Val))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblv12)
                    .addComponent(lblv12Val))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblAlp1)
                    .addComponent(lblAlp1Val))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jLabel1.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel1.setText("Thickness:");

        javax.swing.GroupLayout pnlExample1Layout = new javax.swing.GroupLayout(pnlExample1);
        pnlExample1.setLayout(pnlExample1Layout);
        pnlExample1Layout.setHorizontalGroup(
            pnlExample1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 50, Short.MAX_VALUE)
        );
        pnlExample1Layout.setVerticalGroup(
            pnlExample1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 20, Short.MAX_VALUE)
        );

        lblH.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblH.setText("<h> mm");

        jLabel3.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        jLabel3.setText("ρ:");

        lblRho.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblRho.setText("<html><rho> Kg/m<sup>3</sup></html>");

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlExample1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblH, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel3)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblRho, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel1)
                        .addComponent(lblH)
                        .addComponent(lblRho, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel3))
                    .addComponent(pnlExample1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        lblE3.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        lblE3.setText("E3:");

        lblg31.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        lblg31.setText("G31:");

        lblv31.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        lblv31.setText("v31:");

        lblAlp3.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        lblAlp3.setText("α3:");

        lblE3Val.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblE3Val.setText("<E3> GPa");
        lblE3Val.setToolTipText("Value is just an approach");
        lblE3Val.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(212, 42, 0)));

        lblg31Val.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblg31Val.setText("<G31> GPa");
        lblg31Val.setToolTipText("Value is just an approach");
        lblg31Val.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(212, 42, 0)));

        lblv31Val.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblv31Val.setText("<v31>");
        lblv31Val.setToolTipText("Value is just an approach");
        lblv31Val.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(212, 42, 0)));

        lblAlp3Val.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblAlp3Val.setText("<alpha3>");
        lblAlp3Val.setToolTipText("Value is just an approach");
        lblAlp3Val.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(212, 42, 0)));

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(lblAlp3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(lblv31, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(lblE3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(lblg31, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblAlp3Val, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(lblv31Val, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(lblg31Val, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(lblE3Val, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblE3)
                    .addComponent(lblE3Val))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblg31)
                    .addComponent(lblg31Val))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblv31)
                    .addComponent(lblv31Val))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblAlp3)
                    .addComponent(lblAlp3Val))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        lblE2.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        lblE2.setText("E2:");

        lblE2Val.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblE2Val.setText("<E2> GPa");

        lblg23.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        lblg23.setText("G23:");

        lblg23Val.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblg23Val.setText("<G23> GPa");

        lblv23.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        lblv23.setText("v23:");

        lblv23Val.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblv23Val.setText("<v23>");

        lblAlp2.setFont(new java.awt.Font("Trebuchet MS", 1, 11)); // NOI18N
        lblAlp2.setText("α2:");

        lblAlp2Val.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblAlp2Val.setText("<alpha2>");

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(lblv23, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(lblg23, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(lblE2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(lblv23Val, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(lblg23Val, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(lblE2Val, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 67, Short.MAX_VALUE)))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(lblAlp2, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblAlp2Val, javax.swing.GroupLayout.DEFAULT_SIZE, 60, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblE2)
                    .addComponent(lblE2Val))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblg23)
                    .addComponent(lblg23Val))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblv23)
                    .addComponent(lblv23Val))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblAlp2)
                    .addComponent(lblAlp2Val))
                .addContainerGap(21, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout pnlDataLayout = new javax.swing.GroupLayout(pnlData);
        pnlData.setLayout(pnlDataLayout);
        pnlDataLayout.setHorizontalGroup(
            pnlDataLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDataLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlDataLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jPanel7, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pnlDataLayout.createSequentialGroup()
                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        pnlDataLayout.setVerticalGroup(
            pnlDataLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDataLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlDataLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder("Plot angle ply laminate"));

        btnAnglePly.setText("Plot");
        btnAnglePly.setToolTipText("Not yet supported");
        btnAnglePly.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAnglePlyActionPerformed(evt);
            }
        });

        cbAnglePly.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "A", "E", "G", "N" }));

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(cbAnglePly, 0, 169, Short.MAX_VALUE)
            .addComponent(btnAnglePly, javax.swing.GroupLayout.DEFAULT_SIZE, 169, Short.MAX_VALUE)
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(cbAnglePly, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnAnglePly))
        );

        btnFE.setText("Fiber & Epoxy");
        btnFE.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnFEActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnFE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addComponent(pnlData, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(pnlFE, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
            .addComponent(lblManufacturer, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(lblName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(lblName)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblManufacturer)
                .addGap(32, 32, 32)
                .addComponent(pnlData, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnFE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pnlFE, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnAnglePlyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAnglePlyActionPerformed
        AnglePlyChartForm frm = new AnglePlyChartForm();
        frm.setInfo(mat, cbAnglePly.getSelectedIndex());
        frm.setVisible(true);
    }//GEN-LAST:event_btnAnglePlyActionPerformed

    private void btnFEActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnFEActionPerformed
        if (btnFE.isSelected()) {
            foldOut();
        } else {
            foldIn();
        }
    }//GEN-LAST:event_btnFEActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(showMaterialDetails.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(showMaterialDetails.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(showMaterialDetails.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(showMaterialDetails.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new showMaterialDetails().setVisible(true);
            }
        });
    }
    
    private void foldIn()
    {
        pnlFE.setVisible(false);
        this.setSize((int)this.getSize().getWidth(), (int)shortHeight);
        pnlData.setLocation(pos);
        this.repaint();
    }

    private void foldOut()
    {
        this.setSize((int)this.getSize().getWidth(), (int)longHeight);
        pnlFE.setVisible(true);
        pnlData.setLocation(pos);
        this.repaint();
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAnglePly;
    private javax.swing.JToggleButton btnFE;
    private javax.swing.JComboBox cbAnglePly;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JLabel lblAlp1;
    private javax.swing.JLabel lblAlp1Val;
    private javax.swing.JLabel lblAlp2;
    private javax.swing.JLabel lblAlp2Val;
    private javax.swing.JLabel lblAlp3;
    private javax.swing.JLabel lblAlp3Val;
    private javax.swing.JLabel lblE1;
    private javax.swing.JLabel lblE1Val;
    private javax.swing.JLabel lblE2;
    private javax.swing.JLabel lblE2Val;
    private javax.swing.JLabel lblE3;
    private javax.swing.JLabel lblE3Val;
    private javax.swing.JLabel lblEpoAlpha;
    private javax.swing.JLabel lblEpoE;
    private javax.swing.JLabel lblEpoManufacturer;
    private javax.swing.JLabel lblEpoName;
    private javax.swing.JLabel lblEpoRho;
    private javax.swing.JLabel lblEpov;
    private javax.swing.JLabel lblFibAlpha;
    private javax.swing.JLabel lblFibE;
    private javax.swing.JLabel lblFibManufacturer;
    private javax.swing.JLabel lblFibName;
    private javax.swing.JLabel lblFibRho;
    private javax.swing.JLabel lblFibv;
    private javax.swing.JLabel lblH;
    private javax.swing.JLabel lblManufacturer;
    private javax.swing.JLabel lblName;
    private javax.swing.JLabel lblRho;
    private javax.swing.JLabel lblVf;
    private javax.swing.JLabel lblg12;
    private javax.swing.JLabel lblg12Val;
    private javax.swing.JLabel lblg23;
    private javax.swing.JLabel lblg23Val;
    private javax.swing.JLabel lblg31;
    private javax.swing.JLabel lblg31Val;
    private javax.swing.JLabel lblv12;
    private javax.swing.JLabel lblv12Val;
    private javax.swing.JLabel lblv23;
    private javax.swing.JLabel lblv23Val;
    private javax.swing.JLabel lblv31;
    private javax.swing.JLabel lblv31Val;
    private javax.swing.JPanel pnlData;
    private Draw.pnlExample pnlExample1;
    private javax.swing.JPanel pnlFE;
    // End of variables declaration//GEN-END:variables
}
